<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html> 
<head> 
<title></title> 
	<link rel="stylesheet" type="text/css" href="../easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../easyui/themes/icon.css">
	<script type="text/javascript" src="../easyui/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="../easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
	<script type="text/javascript" src="../js/Calendar.js"></script>
	
	<script type="text/javascript" src="../js/common.js"></script>
	
	<link rel="stylesheet" type="text/css" href="../css/common.css">
	<link rel="stylesheet" type="text/css" href="../css/table.css">

<script>
function check(){
	if(fm.tn_title.value==""){
		$.messager.alert('提示','请输入公告主題','warning');
		return;
	}
	if(CKEDITOR.instances.tn_content.getData()==""){
		$.messager.alert('提示','请输入公告内容','warning');
		return;
	} 
	fm.submit();
}
</script>
</head> 
<body>
<form action="addPubinfo.html" name="fm" method="post" >
<table width="60%" border="0" cellspacing="1" align="center" cellpadding="1" class="ListTable">
	<thead>
		<tr>
			<td align="center" class="TableRow" colspan="4" nowrap style= "border-bottom:1">
					&nbsp;发布公告&nbsp;
			</td>
		</tr>
	</thead>
	<TBODY>
	<TR>
		<TD height="30" align="center" class="RecordRow" nowrap style= "border-bottom:1" style="border-right:1">公告主题&nbsp;</TD>
		<TD class="RecordRow" colspan="3" style= "border-bottom:1">&nbsp;
			<INPUT  class=textColorWrite name="tn_title"  size="71" value="${Pubinfo.tn_title }">
			  <font color="red" style="center">*</font>
		</TD>
	</TR>
	
	<TR>
		<TD height="30" colspan="4"  align="center" class="RecordRow" nowrap style= "border-bottom:1" style="border-right:1">公告内容&nbsp;</TD>
	</TR>
	<TR>
		<td  colspan="4" class="RecordRow" >
				<textarea name="tn_content" id="tn_content" cols="45" rows="4">${Pubinfo.tn_content }</textarea>
		</td> 
	</TR>
	<TBODY>
</table>
</form>

<table width="60%" border="0" cellspacing="1" align="center" cellpadding="1" class="ListTable">
<tr align=center>
<td>
	<c:choose>
		<c:when test="${department == null}">  
			<input type="button" class="mybutton" value='发布' onclick="check()"/> &nbsp;
		</c:when>
		<c:otherwise> 
			<input type="button" class="mybutton" value='修改' onclick="check()"/> &nbsp;
		</c:otherwise>   
	</c:choose>
	<input type="button" class="mybutton" value='返回' onclick="history.back();"/></td>
<tr>
</table>
<script>
CKEDITOR.replace( 'tn_content' );
</script>
</body>
</html>